home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / x11 / strategy / xvmahjon.por / xvmahjon / xvmahjongg / image-stuff / Img-mk-swap < prev    next >
Text File  |  1991-09-26  |  472b  |  29 lines

  1. #! /bin/sh
  2. #
  3. # 9/21/91 - skt
  4.  
  5. if test ! -f images/color/0
  6. then
  7.     echo "You need to create images/color/* first"
  8.     exit 1
  9. fi
  10.  
  11. if test ! -d images/swap
  12. then
  13.     if mkdir images/swap
  14.     then
  15.     : ok
  16.     else
  17.     echo "Error, couldn't make directory images/swap"
  18.     exit 1
  19.     fi
  20. fi
  21.  
  22. # To avoid problems when symbolic links are used, directory
  23. # changes are avoided below.
  24.  
  25. for f in `ls images/color`
  26. do
  27.     sed 's/0x\(..\)\(..\)/0x\2\1/g' images/color/$f > images/swap/$f
  28. done
  29.